from rest_framework.serializers import ModelSerializer
from z_Userapp.models import UserModel, WorkOrderModel, StorageModel, MessageModel,FaModel


class UserSer(ModelSerializer):
    class Meta:
        model = UserModel
        fields = ['id' , 'username', 'user_level']


class UserSer1(ModelSerializer):
    class Meta:
        model = UserModel
        fields = ['id', 'username', 'user_level']


# 工单分类表序列化
class WorkOrderSer(ModelSerializer):
    class Meta:
        model = WorkOrderModel
        fields = '__all__'

# 入库表序列化
class StorageSer(ModelSerializer):
    class Meta:
        model = StorageModel
        fields = '__all__'
class MessageSer(ModelSerializer):
    class Meta:
        model = MessageModel
        fields = '__all__'
class FaSer(ModelSerializer):
    class Meta:
        model = FaModel
        fields = '__all__'
